import com.demo.dto.Dogdto;
import com.demo.service.DogService;

import java.util.Arrays;
import java.util.List;
import java.util.zip.ZipFile;

public class Main {


    public static void main(String[] args) {
        DogService service = new DogService();
        service.getAllDogdto();
        Dogdto dog1 = new Dogdto(1, "大黄", 3);
        Dogdto dog2 = new Dogdto(2, "大黄1", 3);
        Dogdto dog3 = new Dogdto(3, "大黄2", 3);
        Dogdto dog4 = new Dogdto(4, "大黄3", 5);
        Dogdto dog5 = new Dogdto(5, "大黄3", 5);
        Dogdto dog6 = new Dogdto(6, "大黄4", 5);
        service.addDog(dog1);
        service.addDog(dog2);
        service.addDog(dog3);
        service.addDog(dog4);
        service.addDog(dog5);
        System.out.println("==================");
        service.getAllDogdto();
        System.out.println("==================");
        service.updateDog(8, new Dogdto(8, "旺财", 2));
        service.updateByDog1("大黄3",10);
        System.out.println("==================");
        System.out.println("==================");
        System.out.println("==================");
        System.out.println("==================");
        List<Dogdto> dogdtos3 = service.getAllDogdto();

//        for (int i = 0; i < dogdtos3.size(); i++) {
//            Dogdto dog = dogdtos3.get(i);
//            System.out.println(dog.getName());
//            //System.out.println("id "+dog.getId()+"名字 "+dog.getName()+"年龄 "+dog.getAge());
//        }
        service.getAllDogdto();
        List<Integer> fanhui = Arrays.asList(4, 2);
        List<Dogdto> dogs = service.getDogsByIds(fanhui);
       System.out.println(dogs);


        System.out.println(dogdtos3);
        //System.out.println(dogdtos3);
        System.out.println("==================");
        System.out.println("==================");
        //Dogdto dog6 = service.quert(4);
        //System.out.println(dog6);
        //service.updateDog(5, new Dogdto(5, "小红", 16));
        //service.updateDog(2, new Dogdto(2, "小张", 20));
        System.out.println("==================");
        //service.removeDogdto(2);
        System.out.println("==================");
        //service.getAllDogdto();


    }


}
